//
//  WeiTuoChuZuVc.m
//  RENTVISITOR
//
//  Created by wonder on 2017/10/26.
//  Copyright © 2017年 UNN. All rights reserved.
//

#import "WeiTuoChuZuVc.h"
#import "RentVieitor.h"
#import "WeiTuoDetailVC.h"

@interface WeiTuoChuZuVc ()

@end

@implementation WeiTuoChuZuVc

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setNaviViews];
    [self setUI];
    // Do any additional setup after loading the view.
}
- (void)setNaviViews{
    //返回按钮
    UIButton *backBtn = [UIButton new];
    [backBtn setImage:[UIImage imageNamed:@"消息"] forState:UIControlStateNormal];
    backBtn.imageView.contentMode = UIViewContentModeCenter;
//    [backBtn addTarget:self action:@selector(backAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.naviView addSubview:backBtn];
    [backBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(self.naviView).mas_offset(10);
        make.right.mas_equalTo(self.naviView).mas_offset(-15*ScaleWidth);
        make.width.mas_equalTo(88*ScaleWidth);
        make.height.mas_equalTo(88*ScaleHeight);
    }];
}
- (void)setUI{
    UIView *bgView = [[UIView alloc]initWithFrame:CGRectMake(0, (64+10), ScreenWidth, ScreenHeight-74)];
    bgView.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:bgView];
    UIImageView *wenjianimageView = [[UIImageView alloc]init];
    wenjianimageView.image = [UIImage imageNamed:@"文件"];
    [bgView addSubview:wenjianimageView];
    [wenjianimageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(bgView.mas_centerX);
        make.top.mas_equalTo(bgView.mas_top).mas_offset(150*ScaleHeight);
        make.size.mas_equalTo(CGSizeMake(95*ScaleWidth, 140*ScaleHeight));
    }];
    UILabel *lable1 = [[UILabel alloc]init];
    lable1.font = [UIFont systemFontOfSize:17];
    lable1.textColor = [UIColor colorWithHexString:@"#101010"];
    lable1.textAlignment = NSTextAlignmentCenter;
    lable1.text = @"暂无房源";
    [bgView addSubview:lable1];
    [lable1 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(bgView.mas_centerX);
        make.top.mas_equalTo(wenjianimageView.mas_bottom).mas_offset(60*ScaleHeight);
        make.height.mas_equalTo(32*ScaleHeight);
    }];
    UILabel *lable2 = [[UILabel alloc]init];
    lable2.font = [UIFont systemFontOfSize:13];
    lable2.textColor = [UIColor colorWithHexString:@"#666666"];
    lable2.textAlignment = NSTextAlignmentCenter;
    lable2.text = @"您还没有在租客委托房源哦";
    [bgView addSubview:lable2];
    [lable2 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(bgView);
        make.top.mas_equalTo(lable1.mas_bottom).mas_offset(60*ScaleHeight);
        make.height.mas_equalTo(32*ScaleHeight);
    }];
    UIButton *button = [UIButton new];
    [button setTitle:@"委托出租" forState:UIControlStateNormal];
    [button setTitleColor:RGBA(255, 255, 255, 1) forState:UIControlStateNormal];
    button.backgroundColor = RGBA(31, 174, 12, 1);
    [button.layer setMasksToBounds:YES];//设置按钮的圆角半径不会被遮挡
    [button.layer setCornerRadius:1];
    [button.layer setBorderWidth:1];
    button.layer.borderColor = RGBA(31, 174, 12, 1).CGColor;
    [bgView addSubview:button];
    [button addTarget:self action:@selector(pushVc) forControlEvents:UIControlEventTouchUpInside];
    [button mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(bgView);
        make.top.mas_equalTo(lable2.mas_bottom).mas_equalTo(82*ScaleWidth);
        make.size.mas_equalTo(CGSizeMake(272*ScaleWidth, 78*ScaleHeight));
    }];
    UIView *line1 = [[UIView alloc]init];
    [bgView addSubview:line1];
    line1.backgroundColor = [UIColor colorWithHexString:@"#BABABA"];
    [line1 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(bgView.mas_left).mas_offset(80*ScaleWidth);
        make.top.mas_equalTo(button.mas_bottom).mas_offset(328*ScaleHeight);
        make.size.mas_equalTo(CGSizeMake(170*ScaleWidth, 2*ScaleHeight));
    }];
    UILabel *lable3 = [[UILabel alloc]init];
    lable3.font = [UIFont systemFontOfSize:12];
    lable3.textColor = [UIColor colorWithHexString:@"#999999"];
    lable3.textAlignment = NSTextAlignmentCenter;
    lable3.text = @"房源委托发布流程";
    [bgView addSubview:lable3];
    [lable3 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(bgView);
        make.top.mas_equalTo(button.mas_bottom).mas_offset(318*ScaleHeight);
        make.height.mas_equalTo(24*ScaleHeight);
    }];
    UIView *line2 = [[UIView alloc]init];
    [bgView addSubview:line2];
    line2.backgroundColor = [UIColor colorWithHexString:@"#BABABA"];
    [line2 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(lable3.mas_right).mas_offset(30*ScaleWidth);
        make.top.mas_equalTo(line1.mas_top);
        make.size.mas_equalTo(CGSizeMake(170*ScaleWidth, 2*ScaleHeight));
    }];
    UIImageView *DiannaoimageView = [[UIImageView alloc]init];
    DiannaoimageView.image = [UIImage imageNamed:@"电脑"];
    [bgView addSubview:DiannaoimageView];
    [DiannaoimageView mas_makeConstraints:^(MASConstraintMaker *make) {

        make.top.mas_equalTo(button.mas_bottom).mas_offset(400*ScaleHeight);
        make.left.mas_equalTo(bgView.mas_left).mas_offset(120*ScaleWidth);
        make.size.mas_equalTo(CGSizeMake(86*ScaleWidth, 86*ScaleHeight));
    }];
    UIImageView *JiantouimageView = [[UIImageView alloc]init];
    JiantouimageView.image = [UIImage imageNamed:@"箭头"];
    [bgView addSubview:JiantouimageView];
    [JiantouimageView mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.top.mas_equalTo(button.mas_bottom).mas_offset(434*ScaleHeight);
        make.left.mas_equalTo(DiannaoimageView.mas_right).mas_offset(34*ScaleWidth);
        make.size.mas_equalTo(CGSizeMake(62*ScaleWidth, 18*ScaleHeight));
    }];
    UIImageView *KeFuimageView = [[UIImageView alloc]init];
    KeFuimageView.image = [UIImage imageNamed:@"客服"];
    [bgView addSubview:KeFuimageView];
    [KeFuimageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(bgView);
        make.top.mas_equalTo(DiannaoimageView);
        make.size.mas_equalTo(CGSizeMake(86*ScaleWidth, 86*ScaleHeight));
    }];
    UIImageView *JiantouimageView2 = [[UIImageView alloc]init];
    JiantouimageView2.image = [UIImage imageNamed:@"箭头"];
    [bgView addSubview:JiantouimageView2];
    [JiantouimageView2 mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.top.mas_equalTo(button.mas_bottom).mas_offset(434*ScaleHeight);
        make.left.mas_equalTo(KeFuimageView.mas_right).mas_offset(34*ScaleWidth);
        make.size.mas_equalTo(CGSizeMake(62*ScaleWidth, 18*ScaleHeight));
    }];
    UIImageView *SellmageView = [[UIImageView alloc]init];
    SellmageView.image = [UIImage imageNamed:@"我要出售"];
    [bgView addSubview:SellmageView];
    [SellmageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(DiannaoimageView);
        make.right.mas_equalTo(bgView.mas_right).mas_offset(-120*ScaleWidth);
        make.size.mas_equalTo(CGSizeMake(86*ScaleWidth, 86*ScaleHeight));
    }];
    UILabel *lables1 = [[UILabel alloc]init];
    lables1.font = [UIFont systemFontOfSize:12];
    lables1.textColor = [UIColor colorWithHexString:@"#999999"];
    lables1.textAlignment = NSTextAlignmentCenter;
    lables1.text = @"线上发布";
    [bgView addSubview:lables1];
    [lables1 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(DiannaoimageView.mas_centerX);
        make.top.mas_equalTo(DiannaoimageView.mas_bottom).mas_offset(18*ScaleHeight);
        make.height.mas_equalTo(24*ScaleHeight);
    }];
    UILabel *lables2 = [[UILabel alloc]init];
    lables2.font = [UIFont systemFontOfSize:12];
    lables2.textColor = [UIColor colorWithHexString:@"#999999"];
    lables2.textAlignment = NSTextAlignmentCenter;
    lables2.text = @"客服核实";
    [bgView addSubview:lables2];
    [lables2 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(KeFuimageView.mas_centerX);
        make.top.mas_equalTo(KeFuimageView.mas_bottom).mas_offset(18*ScaleHeight);
        make.height.mas_equalTo(24*ScaleHeight);
    }];
    UILabel *lables3 = [[UILabel alloc]init];
    lables3.font = [UIFont systemFontOfSize:12];
    lables3.textColor = [UIColor colorWithHexString:@"#999999"];
    lables3.textAlignment = NSTextAlignmentCenter;
    lables3.text = @"房源上架";
    [bgView addSubview:lables3];
    [lables3 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(SellmageView.mas_centerX);
        make.top.mas_equalTo(SellmageView.mas_bottom).mas_offset(18*ScaleHeight);
        make.height.mas_equalTo(24*ScaleHeight);
    }];
 
    
}
- (void)pushVc
{
    WeiTuoDetailVC *weiDetailVC = [[WeiTuoDetailVC alloc]init];
    weiDetailVC.titleStr = @"发布委托";
    [self presentViewController:weiDetailVC animated:YES completion:nil];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
